#ifndef __CRAZYFISH_ELEMENT_1D1__

#include <iostream>


/* class Element_1D1 */
/* { */
/* private: */
/*     Dofs dof; */
/*     MeshGrid grid; */
/*     BasisFunction phi; */
/* public: */
/*     Element_1D1(); */
/*     ~Element_1D1(); */
/* }; */

/* class Dofs */
/* { */
/* private: */
/*     int no_dofs; */
/*     Point_1 pnts; */
/*     int global_idx; */
/* public: */
/*     Dofs(); */
/*     ~Dofs(); */
/* }; */



/* class BasisFunction */
/* { */
/* private: */
/*     int no_zero_pnts; */
/*     double coef; */
/* public: */
/*     BasisFunction(); */
/*     ~BasisFunction(); */
/*     func_val(); */
/*     dfunc_val();     */
/* }; */

class Point_1
{
private:
    double *coord;
public:
    Point_1();
    Point_1(double _x);
    Point_1(const Point_1& _p);
    Point_1(Point_1& _p);
    ~Point_1();
    double operator()() const;
    void operator()(double _x);
    const Point_1& operator=(const Point_1& _p);
    friend std::ostream& operator<<(std::ostream& _os, const Point_1 &_p);
    friend Point_1 operator+(const Point_1 &_p1, const Point_1 &_p2);
};
    
std::ostream& operator<<(std::ostream& _os, const Point_1 &_p);
Point_1 operator+(const Point_1 &_p1, const Point_1 &_p2);

class MeshGrid
{
private:
    int no_vertex;
    Point_1 *vertices;
    int *global_idx;
public:
    MeshGrid();
    ~MeshGrid();
    void set_global_idx(int _i, int _idx);
    int get_global_idx(int _i) const;
    void set_vertices(const Point_1 *_pnt_list);
    void set_vertices(int _i, const Point_1 &_p);
    const Point_1* get_vertices() const;
    const Point_1& get_vertices(int _i) const;
};

#else
// DO NOTHING.
#endif
